
# Table 1 FD
table = first.difference.table(New_York_2010_Models , 0, 1)
rownames(table) = c("Log(Stops)",  "Black", "Latino", "Non-citizen", "Same House", "Homeowner", 
           "Log(Population)", "Log(Income)", "Single Mother", "Turnout 08")
colnames(table) = c("\\textbf{Stops}", "\\textbf{Frisks and Searches}", "\\textbf{Force}", "\\textbf{Furtive Movements}")
table = capture.output(xtable(table, type='latex', align = c("l", "c", "c", "c",  "c")))
format.first.diff(table, "2010 First Differences", models= 4)


# Table 2 FD
table = first.difference.table(New_York_2008_Models, 0, 1)
rownames(table) = c("Log(Stops)", "Black", "Latino", "Non-citizen", "Same House", "Homeowner", 
           "Log(Population)", "Log(Income)", "Single Mother", "Turnout 06")
colnames(table) = c("\\textbf{Stops}", "\\textbf{Frisks and Searches}", "\\textbf{Force}", "\\textbf{Furtive Movements}")
table = capture.output(xtable(table, type='latex', align = c("l", "c", "c", "c",  "c")))
format.first.diff(table, "2008 First Differences", models= 4)


# Table 3 FD
table = first.difference.table(New_York_2006_Models, 0, 1)
rownames(table) = c("Log(Stops)", "Black", "Latino", "Non-citizen", "Same House", "Homeowner", 
           "Log(Population)", "Log(Income)", "Single Mother")
colnames(table) = c("\\textbf{Stops}", "\\textbf{Frisks and Searches}", "\\textbf{Force}", "\\textbf{Furtive Movements}")
table = capture.output(xtable(table, type='latex', align = c("l", "c", "c", "c", "c")))
format.first.diff(table, "2006 First Differences", models= 4)


# Table 4 FD
table = first.difference.table(mayoral_models, 0, 1)
rownames(table) <- c("Log(Stops)", "Black", "Latino", "Same House", "Homeowner", "Log(Population)", 
                     "Log(Income)", "Single Mother", "Registered Democrats","Turnout 09")
colnames(table) = c("\\textbf{Primary Election}", "\\textbf{General Election}")
table = capture.output(xtable(table, type='latex', align = c("l","c", "c")))
format.first.diff(table, "Effect of Police Stops on Voter Turnout: Mayoral Model First Differences", models= 2)


# Table 5 FD
table = first.difference.table(candidate_suport, 0, 1)
rownames(table) <- c("Log(Stops)", "Black","Latino", "Same House", "Homeowner", "Log(Population)", "Log(Income)", "Single Mother",
                     "Turnout 09: Primary", "Candidate Support: '09")
colnames(table) = c("\\textbf{Thompson}", "\\textbf{De Blasio}", "\\textbf{Liu}")
table = capture.output(xtable(table, type='latex', align = c("l", "c","c","c")))
format.first.diff(table, "Mayoral Turnout", models=3 )






